<div class="row clearfix" [@SimpleAnimate]="'fadeIn'">
    <div class="col-md-12 column">
        <div class="box-inner">
            <div class="well box-header tool_bar_header" style="padding-top: 5px">
                <button (click)="back()" type="button" class="btn btn-sm btn-default"><i class="glyphicon glyphicon-arrow-left">返回</i></button>
            </div>
            <div class="box-content">
                <div class="container">
                    <div class="row clearfix">
                        <div class="col-md-8 column">
                            <form role="form">
                                <div class="form-group">
                                    <label >上级菜单</label>
                                    <select name="menu.pid" [(ngModel)]="menu.pid" class="form-control" required>
                                        <option *ngFor="let menu of menuArray" [value]="menu.id" ><span [innerHTML]='menu.name'></span></option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label>菜单名称</label>
                                    <input #menuName="ngModel" name="menu.name" [(ngModel)]="menu.name" class="form-control" placeholder="菜单名称" type="text" required>
                                </div>
                                <div class="form-group">
                                    <label>菜单URL</label>
                                    <input name="menu.url" [(ngModel)]="menu.url" class="form-control" placeholder="菜单URL，例如：/main/menu" type="text" required>
                                </div>
                                <div class="form-group">
                                    <label>菜单图标</label>
                                    <input name="menu.icon" [(ngModel)]="menu.icon" class="form-control" placeholder="菜单图标，例如：glyphicon glyphicon-search" type="text"
                                        required>
                                </div>
                                <div class="form-group">
                                    <label>排序</label>
                                    <input name="menu.rank" [(ngModel)]="menu.rank" class="form-control" placeholder="菜单排序，升序" type="number">
                                </div>
                                <div class="form-group">
                                    <label>注册请求</label>
                                    <input name="menu.actions" [(ngModel)]="menu.actions" class="form-control" placeholder="注册请求，逗号分割" type="text">
                                </div>
                                <div class="form-group">
                                    <label>注册路由</label>
                                    <input name="menu.routerUrls" [(ngModel)]="menu.routerUrls" class="form-control" placeholder="注册路由，逗号分割" type="text">
                                </div>
                                <hr>
                                <button type="button" (click)="save()" class="btn btn-success" [ngClass]="{'disabled': menuName.invalid}">保存</button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>